package org.sample.springboot.verifier;

import org.sample.springboot.model.Account;
import org.sample.springboot.web.AccountResponse;

import java.util.function.Consumer;

public class AccountResponseVerifier extends Verifier<AccountResponse> {

	private AccountResponseVerifier() {

	}

	public static interface AccountResponsePropVerifier extends Consumer<AccountResponse> {

	}

	public static AccountResponseVerifier expect(AccountResponsePropVerifier... propVerifiers) {
		AccountResponseVerifier verifier = new AccountResponseVerifier();
		verifier.propVerifiers = propVerifiers;
		return verifier;
	}

	public static AccountResponsePropVerifier account(Verifier<Account> accountVerifier) {
		return obj -> accountVerifier.verify(obj.getAccount());
	}

}
